package cn.chencaiju.day09;

import org.junit.Test;

import cn.chencaiju.day04.Employee;
import cn.chencaiju.day04.Programmer;

public class ExceptionRuntime {
	public void handHandleException(int...number) {
		if(number==null||number.length==0) {
			throw new RuntimeException("参数不能为空");
		}
		System.out.println("无差错地调用了此方法！");
	}
	@Test public void testHandHandleException() {
		handHandleException(2,3,4);
		handHandleException();
	}
	
	/*
	 * 子类不能转换成父类类型
	 */
	@Test public void testCastException() {
		Programmer p=(Programmer) new Employee(); 
		
	}
}
